The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent it is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
In order to facilitate the printing of images in a printing device, an image having continuous tones (also referred to herein as a “continuous tone image” or a “contone image”) is generally converted into an image having halftones. For example, a black & white picture is reproduced in a newspaper as a grid or array of black dots, with relatively lighter areas having smaller and/or less number of dots, and relatively darker areas having larger and/or more number of dots. For very dark areas of a halftone image, the larger spots run into one another so that the dark area looks like small white spots on a black field.
Error diffusion is a type of halftoning technique, in which a quantization error associated with a pixel is distributed to neighboring pixels that have not yet been processed. For example, in a halftoning process, while processing a pixel, an input level of the pixel is quantized to generate a corresponding output level. An error is generally generated while generating the output level, where the error is associated with a difference between the input level and the output level. This error associated with the pixel is generally distributed or propagated to neighboring pixels that have not yet been processed. Thus, an output level of a pixel is generally a function of an input level of the pixel and errors accumulated from previously processed neighboring pixels (also referred to herein as an accumulated error of the pixel). Error diffusion halftoning preserves, for example, a local arithmetic mean of the image (e.g., preserves an average tone of a portion of the image).
FIG. 1 schematically illustrates error propagation in an error diffusion halftoning process. FIG. 1 illustrates a plurality of pixels for which a halftone image is to be generated. Some of the pixels in FIG. 1 are labeled using a coordinate system. For example, a first pixel is labeled as (i,j), a pixel to the immediate right of the pixel (i,j) is labeled as (i+1,j), a pixel to the immediate bottom of the pixel (i,j) is labeled as (i,j+1), and so on. In FIG. 1, the pixels illustrated using diagonal stripes have already been processed, the pixel (i,j) illustrated using vertical stripes is currently being processed, and the remaining pixels (illustrated without any stripes) are yet to be processed. A pixel that is currently being processed is also referred to herein as a target pixel. Thus, in FIG. 1, the pixel (i,j) is the target pixel.
The plurality of pixels of FIG. 1 is a part of an image page, for which a halftone image is being generated. A horizontal pixel line that includes the pixel (i−2,j−1) is a top-most horizontal pixel line of the image page, and a vertical pixel line that includes the pixel (i−2,j−1) is a left-most vertical pixel line of the image page, as illustrated in FIG. 1.
In an example, pixels are assumed to be processed from top to bottom, and from left to right. For example, pixels of the top-most horizontal pixel line are processed from left to right (i.e., pixels (i−2,j−1), . . . (i+1,j−1) are processed sequentially), then pixels in a second horizontal pixel line (i.e., the horizontal pixel line that includes pixel (i−2,j)) are processed, and so on.
A halftone output level of the target pixel (i,j) is currently being generated, based at least in part on an input level of the pixel (i,j) and an accumulated error of the pixel (i,j). For example, the accumulated error of the pixel (i,j) is based on errors propagated from pixels (i−1,j−1), (i,j−1), (i+1,j−1), and (i−1,j) while processing these pixels. An accumulated error of a pixel generally is a function of the input levels of pixels that have been recently processed. An error E1 is generated while processing the pixel (i,j). The error E1 is representative of a difference between the output level and the input level of the pixel (i,j). In an error diffusion halftoning, the error E1 is propagated or distributed to neighboring pixels that have not yet been processed. For example, 7/16th portion of the error E1 is assigned to the pixel (i+1,j), which is to the immediate right of the pixel (i,j); 3/16th portion of the error E1 is assigned to the pixel (i−1,j+1), which is to the immediate left-bottom corner of the pixel (i,j); and so on, as illustrated in FIG. 1.
In error diffusion halftoning, start-up artifacts generally occur at the top of an image page. For example, the accumulated error of the pixel (i−2,j−1) is zero as, for example, this pixel is the top-left most pixel of the image page (i.e., as errors from previously processed pixels have not yet propagated to the pixel (i−2,j−1)). Similarly, accumulated errors in at least some other pixels of the top-most horizontal pixel line are also close to zero (as, for example, no errors have propagated to these pixels from pixels that are at the top of these pixels). Accordingly, the portion of the generated halftone image corresponding to pixels in the top-most horizontal pixel line is generally not accurate, leading to start-up artifacts at the top of the image page. Generally, it takes awhile (e.g., after a few pixel lines have been processed) for the errors to accumulate enough to reach a new equilibrium state. For example, by the time pixel (i,j+1) is processed, the halftoning process generates sufficient accumulated errors to overcome any start-up artifact associated with pixel (i,j+1). Generally, generating sufficient accumulated errors, to overcome any start-up artifact, is based on the requested tone level of the pixels. For example, for relatively middle tones of the pixels that are processed, the artifacts tend to resolve relatively quickly. For relatively dark or light tones, the artifacts can continue for many lines.
For similar reasons, in some instances, start-up artifacts can also occur in, for example, left portion of the image page (e.g., in pixels of the left-most vertical pixel line of the image page).
In error diffusion halftoning, start-up artifact is generally avoided by introducing random errors in pixels that are in the top and/or left portion of an image page. For example, in FIG. 1, random errors are introduced in at least some of the pixels in the top-most horizontal pixel line. Such introduction of random errors counters, at least in part, the effects of start-up artifacts at the top of the image page of FIG. 1.
FIG. 2 schematically illustrates an image page 200 that includes an image A, an image B and an image C (although the image page 200 can include any other number of images). A halftone image of the image page 200 is generated and printed in a printing device. Although images A, B and C are illustrated having specific shapes, sizes, colors, and relative positions, in various other embodiments, these images can have any shape, size, color and/or relative positions. For example, the images can correspond to any real life images that are generally printed in a printer. The page 200 has white spaces in between images A, B and/or C. For example, FIG. 2 illustrates white space 204 between images A and B.
To avoid start-up artifact in the image page 200, random errors are generally introduced in, for example, pixels included in the top-most horizontal pixel line and/or left-most vertical pixel line of the image page 200. Accordingly, in the generated halftone image, the top portion and/or the left portion of the image A do not generally have visible start-up artifact.
However, after the pixels of the image A is processed during the error diffusion halftoning, a plurality of pixels in the white space 204 is processed. While processing the pixels in the white space 204, the accumulated errors corresponding to the pixels tend to approach towards zero, e.g., if an error reduction algorithm is implemented (if such error reduction algorithm is not turned on, the accumulated errors continue to propagate, but tend towards a set of non-zero, homogenous values). That is, while processing the pixels in the white space 204, the accumulated errors of pixels decrease with processing of more and more white pixels. Thus, if the white space 204 is relatively large (e.g., if the white space 204 includes relatively large number of pixels), by the time pixels in the top portion of the image B is processed, the associated accumulated errors are about zero. Accordingly, in the generated halftone image, the top portion and/or the left portion of the image B have start-up artifact. For similar reasons, in the generated halftone image, the top portion and/or the left portion of the image C also have start-up artifact.
On the other hand, if the white space 204 is relatively small (e.g., if the white space 204 includes relatively small number of pixels), by the time pixels in the top portion if the image B is processed, the associated accumulated errors do not reach zero. That is, in such a case, the accumulated errors in pixels in the top portion of the image B is a function of errors propagated from pixels of image A. In such a case, in the generated halftone image, the top portion of image B will depend on tone levels of image A (e.g., tone levels of bottom portion of image A).
That is, although images A and B are two distinct images (e.g., separated by white space 204), halftoning of image B is based on location of the image B relative to image A. On the other hand, although not illustrated in FIG. 2, if positions of image B and image A are interchanged, then halftoning of image A will be based on location of the image A relative to image B. The manner in which the halftone images corresponding to images A, B and/or C are generated, and the manner in which the images A, B and/or C are printed, therefore, depend on relative positions of these images. Such dependence may be undesirable.